using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace TestModels.Models.Mapping
{
    public class Seller_AreaMap : EntityTypeConfiguration<Seller_Area>
    {
        public Seller_AreaMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.TypeName)
                .HasMaxLength(50);

            this.Property(t => t.Location)
                .HasMaxLength(200);

            this.Property(t => t.Around)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Seller_Area");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.TypeName).HasColumnName("TypeName");
            this.Property(t => t.Created).HasColumnName("Created");
            this.Property(t => t.ParentID).HasColumnName("ParentID");
            this.Property(t => t.Location).HasColumnName("Location");
            this.Property(t => t.Around).HasColumnName("Around");
        }
    }
}
